package com.book.app.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * (Book)表实体类
 *
 * @author wjy
 * @since 2021-09-22 08:48:05
 */
@SuppressWarnings("serial")
@ApiModel
@Data
public class Book implements Serializable {
    @TableId  //数据库对应主键，
    @ApiModelProperty(hidden = true)
    private Integer bid;

    @ApiModelProperty(value = "类别外键",required = true,dataType = "integer",example = "1")
    private Integer cateid;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String catename;//该属性并不是自动生成产生的属性，而是为了页面显示自己加入的

    @ApiModelProperty(value = "图书编号",required = true,dataType = "string",example = "BNXXX")
    private String bnum;

    @ApiModelProperty(hidden = true)
    private String bname;

    @ApiModelProperty(value = "图书单价",required = true,dataType = "integer",example = "100")
    private Integer price;

    @ApiModelProperty(value = "图书作者",required = true,dataType = "string",example = "钱伟长")
    private String author;

    @ApiModelProperty(value = "图书描述",dataType = "string",example = "1")
    private String ddesc;

    @ApiModelProperty(value = "馆藏数量", required = true,dataType = "integer" ,example = "100")
    private Integer quantity;

    @ApiModelProperty(hidden = true)
    @TableLogic
    private Integer deleted;
    @ApiModelProperty(hidden = true)
    private String createtime;
    @ApiModelProperty(hidden = true)
    private String modifytime;

}